﻿{$header}
<div id="main" class="main" >
    <div class="content">
  <h3 class="heading">采购单{$vo.mano}--入库质量管理 [ <a href="__URL__">返回列表</a> ]</h3>
<div id="result" class="result none"></div>
<form class="form-horizontal well" method='post' id="form1" name="form1" action="__URL__/update/">
<table cellpadding=3 cellspacing=3 >
<tr>
    <td>销售订单号</td><td><a href="__APP__/Order/detail/id/{$vo.order_id}"> {$vo.order_id|getModelName='Order','mano'} </a></td>
</tr>
<tr>
    <td width="150px">采购单号：</td>
  <td>
            {$vo.mano}
            <span class="offset1">采购时间：</span> {$vo.create_time|toDate}
        </td>
</tr>
<tr>
    <td class="tRight" width="150px">供应商：</td>
    <td class="tLeft" >{$vo.supplier_id|getModelName='Supplier'}
            联系人:{$vo.supplier_id|getModelName='Supplier','contact_id'|getModelName='Contact'}
        </td>
</tr>
<tr>
  <?php $count_buys = M('Buy')->where('supplier_id = '.$vo['supplier_id']) ->count(); ?>
  <td>合作记录及联系方式</td> <td> <a href="__APP__/Supplier/edit/id/{$vo.supplier_id}#buy" target="_blank">合作记录({$count_buys})</a>  <a class="offset1" href="__APP__/Supplier/edit/id/{$vo.supplier_id}" target="_blank">联系方式</a> 
   </td>
</tr>
  <tr>
    <td>产品</td>
    <td>
        {$vo.product_id|getModelName='Product'}
        <span class="offset1">{$vo.product_id|getPename}</span>
        <span class="offset1">{$vo.product_id|getCas}</span>
        <span class="offset1"> <a href="__APP__/Product/buy/id/{$vo.product_id}" target="_blank"> 采购记录</a> </span>
        <img src="__PUBLIC__/Uploads/product/{$vo.product_id|getCas}.jpg">
    </td>
  </tr>
    
 <tr>
     <td>单价</td><td>{$vo.price} 元
     <strong>规格</strong> {$vo.specification|getModelName='Specification'}</td>
 </tr>
<tr>
     <td>数量</td><td>
     {$vo.number}{$vo.unit_id|getModelName='Unit'} </td>
 </tr>

<tr>
    <td>询价负责人</td>
    <td><input type="hidden" name="ask_charge_man" value="{$vo.ask_charge_man}" />{$vo.ask_charge_man|getModelName='User'} </td>
</tr>    
 <tr>
     <td>要求交货期</td><td>{$vo.delivery_date|toDate='Y-m-d'}
     </td>
 </tr>
 <tr>
     <td>已付款金额</td>
     <td>
         <div class="input-append">{$vo.first_pay}
             <span class="add-on">元</span>
         </div>
     </td>
 </tr>
 <tr>
     <td>快递公司</td>
     <td>{$vo.logi_id|getConfigVal='chinalogi'}

        快递单号：{$vo.logi_no}
        运费 :{$vo.logifee}<span class="add-on">元</span>
     </td>
 </tr>
 <tr>
    <td>预计到货期</td>
    <td>{$vo.expect_date|toDate='Y-m-d'}
    </td>
</tr>
<tr>
  <td class="tRight" >经办人：</td>
  <td class="tLeft" >{$vo.user_id|getModelName='User'}
        </td>
</tr>
<tr>
  <td class="tRight">备注：</td>
        <td class="tLeft">{$vo.remark}
        </td>
</tr>

<tr>
    <td>收货数量：</td>
    <td>{$vo.receive_number}{$vo.unit_id|getModelName='Unit'} </td>
</tr>
<tr><td>收货时间：</td>
    <td>{$vo.receive_time|toDate}
    </td>
</tr>
<tr>
    <td>收货人：</td>
    <td>{$vo.receive_user|getModelName='User'} </td>
</tr>
<tr><td>采购单状态：</td>
    <td>{$vo.status|getConfigVal='buyStatus'}
   </td> 
</tr>
<tr>
    <td>入库质量管理</td>
    <td>{:configList(C('inqcstatus'),$vo['in_qc_status'],'in_qc_status')}</td>
</tr>
<tr>
    <td>货前样质量管理</td>
    <td>{:configList(C('sampleqcstatus'),$vo['sample_qc_status'],'sample_qc_status')}</td>
</tr>
<tr>
 <td>质检指南</td>
 <td> <textarea rows="4" class="span11" name="qc_guide">{$vo.qc_guide}</textarea> </td>
</tr>
<tr>
	<td></td>
	<td class="center" width="300">
        <input type="hidden" value="{$vo.id}" name="id">
	<button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> 保存</button>
	<button type="reset" onclick="javascript:history.back()" class="btn btn-primary offset1"><i class="icon-arrow-left icon-white"></i> 返回</button>
	</td>
</tr>


</table>
</form>

<form class="form-horizontal well" method='post' id="form1" name="form1" action="__URL__/update/">
<table>
  <tr>
    <td>核磁分析</td>
     <td> <textarea rows="4" class="span11" name="nuclear_drawing">{$vo.nuclear_drawing}</textarea> 
     </td>
  </tr>
  <tr>
    <td>核磁结果：</td><td>{:configList(C('nuclear_result'),$vo['nuclear_result'],'nuclear_result' )}</td>
  </tr>
  <tr>
    <td>出图时间：</td><td>{$vo.nuclear_drawing_time|toDate}</td>
  </tr>
  <tr>
  <td></td>
  <td class="center" width="300">
        <input type="hidden" value="{$vo.id}" name="id">
        <input type="hidden" value="{:time()}" name="nuclear_drawing_time">
        <button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> 核磁出图</button>
  </td>
</tr>
</table>
</form>

<notempty name="vo.order_detail_id">
<?php 
$msgs = M('Message')->where('obj_type="Order_detail" and obj_id ='.$vo['order_detail_id'])->order('create_time desc')->findAll();
        
 ?>
<table class="table table-bordered">
  <tr class="alert alert-info"><td colspan=5>订单备注</td>
    <td><a class="btn btn-primary" href="__APP__/Message/add/obj_type/Order_detail/depart/质量管理/obj_id/{$vo.order_detail_id}/return_type/In_qc/return_id/{$vo.id}"><i class="icon-comment icon-white"></i> 创建备注</a></td> 
  </tr>
  <tr> <td>编号</td><td>部门</td><td>留言</td><td>操作人</td>  <td>日期</td><td>修改</td> </tr>
  <!--order by create time desc-->
  <volist name="msgs" id="msg">
    <eq name="_SESSION[C('USER_AUTH_KEY')]" value="$msg.user_id"> 
      <form action="__APP__/Message/update" method="post" id="msg"
      <tr>
        <td> <input type="hidden" name="id" value="{$msg.id}">
          <input type="hidden" name="jumpUrl" value="__SELF__">
          {$msg.id}</td>
        <td>{$msg.depart}</td>
        <td><textarea name="content" class="input-xxlarge" rows="4">{$msg.content}</textarea> </td>
        <td>{$msg.user_id|getModelName='User'}</td>
        <td>{$msg.create_time|toDate}</td>
        <td> <input type="submit" class="btn btn-primary" value="修改"> </td>
      </tr>
      </form>
    <else/>
    <tr>
      <td>{$msg.id}</td>
      <td>{$msg.depart}</td>
      <td>{$msg.content}</td>
      <td>{$msg.user_id|getModelName='User'}</td>
      <td>{$msg.create_time|toDate}</td>
      <td> ---</td>
    </tr>
  </eq>
  </volist>
</table>
</notempty>

</div>
</div>
<include file="Public:footer" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Js/easyui/themes/default/easyui.css">
<script type="text/javascript" src="__PUBLIC__/Js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/filter-product.js"></script>
<load href="__PUBLIC__/Js/My97DatePicker/WdatePicker.js" />
